/************************************************************************

								Heroes IV
					  Copyright 2000, The 3DO Company

	------------------------------------------------------------------
  						 actor_sequence.h

	$Header: /heroes4/actor_sequence.h $

	$NoKeywords: $

 ************************************************************************/

#if !defined( ACTOR_SEQUENCE_H_INCLUDED )
#define ACTOR_SEQUENCE_H_INCLUDED

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#pragma warning( disable: 4786 )

#include <iosfwd>
#include <string>
#include <vector>

#include "copy_on_write_ptr.h"
#include "image_sequence.h"
#include "resource_traits.h"
#include "screen_point.h"

// ------------------------------------------------------------------------------
// t_actor_sequence_24 class
// ------------------------------------------------------------------------------

class t_actor_sequence_24 : public t_image_sequence_24
{
public:
	// Constructors/Destructor
	t_actor_sequence_24();
	t_actor_sequence_24( t_actor_sequence_24 const & other );
	virtual ~t_actor_sequence_24();

	// Member functions
	void	add_owner_name( std::string const & new_owner_name );
	void	clear_owner_names();
	int		get_owner_name_count() const;
	void	get_owner_names( std::vector< std::string > & owner_name_vector ) const;
	bool	read( std::streambuf & stream );
	void	remove_owner_name( std::string const & owner_name );
	bool	set_frames( t_bitmap_group_24 const & bitmap_group );
	bool	write( std::streambuf & stream ) const;

	// Operators
	t_actor_sequence_24 & operator=( t_actor_sequence_24 const & other );

private:
	// Types
	class t_impl;

	// Data members
	t_copy_on_write_ptr< t_impl >	m_impl_ptr;
};

inline bool read( std::streambuf & stream, t_actor_sequence_24 & sequence )
{
	return sequence.read( stream );
}

// ------------------------------------------------------------------------------
// t_actor_sequence class
// ------------------------------------------------------------------------------

class t_actor_sequence : public t_image_sequence
{
public:
	// Constructors
	t_actor_sequence();
	explicit t_actor_sequence(
		t_actor_sequence_24 const &	other,
		t_screen_point const &		offset = t_screen_point( 0, 0 ) );
	t_actor_sequence(
		t_actor_sequence_24 const &	other,
		double						ratio,
		t_screen_point const &		offset = t_screen_point( 0, 0 ) );
};

inline t_actor_sequence::t_actor_sequence()
{
}

inline t_actor_sequence::t_actor_sequence(
	t_actor_sequence_24 const &	other,
	t_screen_point const &		offset )
	:	t_image_sequence( other, offset )
{
}

inline t_actor_sequence::t_actor_sequence(
	t_actor_sequence_24 const &	other,
	double						ratio,
	t_screen_point const &		offset )
	:	t_image_sequence( other, ratio, offset )
{
}

// ------------------------------------------------------------------------------
// t_resource_traits< t_actor_sequence_24 > specialization
// ------------------------------------------------------------------------------

template <>
struct t_resource_traits< t_actor_sequence_24 >
{
	static char const prefix[];
	static char const extension[];
};

#endif // !defined( ACTOR_SEQUENCE_H_INCLUDED )
